package com.kun.event.controller;

import com.kun.event.service.MessagePublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fangkun
 */
@RestController
public class TestController {

    @Autowired
    private MessagePublisher messagePublisher;

    @GetMapping("/publish")
    public String publish(String message){

        messagePublisher.publish(message);
        return "success";
    }

}
